package hibernate_advanced_apply.object_inherit_mapping.single_table.single_table_annotation.source;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

/**
 * @author Administrator
 * @create 2019-01-06 13:39
 * @desc 学生持久化类(注解)
 **/
//标志实体类
@Entity

//添加该类的鉴别名为student,区别于teacher
@DiscriminatorValue("student")
public class Student extends Person{

    private String school;

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }
}
